<template>
  <div class="tabbar">
     <van-tabbar v-model="active" route>
      <van-tabbar-item v-for="(item,index) in barlist" :key="index" :icon="item.icon" :to="item.to"  >{{item.name}}</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
    data() {
        return {
          active: 0,
          barlist:[
            {
              icon:"wap-home-o",
              name:"首页",
              to:"/index/home"
            },
            {
              icon:"fire-o",
              name:"爆爆团",
              to:"/index/tuan"
            },
            {
              icon:"description",
              name:"订单",
              to:"/index/order"
            },
            {
              icon:"user-o",
              name:"我的",
              to:"/index/mine"
            },
          ]
        };
    },
    methods:{
      fun(val){
        console.log(val);
        if(this.$route.path == val) return
        this.$router.push(val)
      }
    }
}
</script>


<style lang="scss" scoped>
::v-deep.van-tabbar{
    height: 1.3333rem;
}
::v-deep .van-icon {
    font-size: .5867rem;
}
::v-deep.van-tabbar-item{
    font-size: .32rem;
}
</style>>